#include <stdio.h>
#include <stdlib.h>
#define M 10
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main() {
	int a[M][M];
	int n,i,j,k;
	for(i=0;i<10;i++){
		for(j=0;j<=i;j++){
			if(i==0||i==j||j==0){
				a[i][j]=1;
			}
			else{
				a[i][j]=a[i-1][j-1]+a[i-1][j];
			}	
		}
	}
	for(i=0;i<10;i++){
		for(k=0;k<M-i;k++){
			printf(" ");
		}
		for(j=0;j<=i;j++){
			printf("%d ",a[i][j]);
		}
		printf("\n");
	}
	return 0;
}
